package com.example.logistics_manage.controller;

import com.example.logistics_manage.pojo.Role;
import com.example.logistics_manage.result.restful.R;
import com.example.logistics_manage.result.restful.ResponseEunm;
import com.example.logistics_manage.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/role")
@CrossOrigin
public class RoleController {
    @Autowired
    IRoleService roleService;
    @GetMapping("/findAllRole")
    public R<List<Role>> findAllRole(){
        return new R<>(ResponseEunm.SUCCESS,roleService.findAllRole());
    }


}
